Skip to content

[정찬욱] 로또 미션 Step2#8

Open
seeyoujeong wants to merge 87 commits intofe-clean-code-study:seeyoujeongfrom
seeyoujeong:step2
Open

[정찬욱] 로또 미션 Step2#8
seeyoujeong wants to merge 87 commits intofe-clean-code-study:seeyoujeongfrom
seeyoujeong:step2

Conversation

@seeyoujeong
Copy link

@seeyoujeong seeyoujeong commented Jul 15, 2024

추가 요구사항 구현 목록

  • 로또 번호는 오름차순으로 정렬하여 보여준다.
  • 당첨 통계를 출력한 뒤에는 재시작/종료 여부를 입력받는다.
  • 재시작할 경우 구입 금액 입력부터 게임을 다시 시작하고, 종료하는 경우 그대로 프로그램을 종료시킨다.
  • 사용자가 잘못된 값을 입력한 경우 throw문을 사용해 예외를 발생시키고, 에러 메시지를 출력 후 그 부분부터 입력을 다시 받는다.

미션을 수행하면서 어려웠던 점

  • 예외 처리 위치 정하기
    기존에는 inputManagerretyrScan 메서드의 콜백에서 에러를 처리하는 형식으로 했었는데, 이렇게 구현하다보니 예외 처리에 한계를 느꼈습니다. 그래서 retryOnFailureAsync라는 메서드를 만들어서 외부에서 처리를 해줄 수 있게 수정했는데, 이게 맞는지 애매하네요...
  • MVC 패턴
    shouldRestartGame, handleErrorAndPrint 메서드를 어디에 넣는게 좋을지 고민을 많이 했네요.

리뷰 받고 싶은 부분 & 궁금한 점

  • 레이어
    각 레이어에 속한 함수나 클래스의 위치가 괜찮은지 의견 공유 부탁드립니다.
  • 가독성
    클래스 내부의 메서드들 혹은 파일의 메서드들의 나열된 순서가 코드를 읽을때 괜찮은지, 이름은 이해가 되는지 궁금합니다!
  • 분리
    최대한 분리를 했지만 더 분리할 코드가 있을까요?

어떤 지점에서 재미를 많이 느끼는지, 희열을 많이 느끼는지, 몰입을 많이 하는지

  • 재미와 희열
    사실 코딩하면서 재미와 희열까지 느껴본 기억은 없는듯하고, 구현을 끝내거나 코드 정리가 깔끔하게 되면 뿌듯함을 느낍니다.
  • 몰입
    하기 싫지 않은 상태에서 특정 시간 내에 끝낼 수 있을 정도의 목표를 정하고 일을 시작하면 몰입이 되는 것 같아요.

Summary by CodeRabbit

  • New Features

    • Implemented the Lotto Mission feature, including purchasing tickets, drawing winning numbers, and displaying results.
    • Added extensive validation for lotto numbers and error handling with user-friendly messages.
  • Tests

    • Introduced comprehensive test cases for all classes involved in the Lotto Mission, ensuring robustness and reliability.
  • Scripts

    • Updated test scripts in package.json for better test management.
  • Documentation

    • Updated the README to reflect the new Lotto Mission functionality.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants